2020-2021 Sunseeker Telemetry and Lighting System
timer_a_ex1_pwmSingle.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Macros

#define TIMER_A_PERIOD   524
 
#define DUTY_CYCLE   393
 

Functions

void main (void)
 

Macro Definition Documentation

◆ DUTY_CYCLE

#define DUTY_CYCLE   393

Definition at line 63 of file timer_a_ex1_pwmSingle.c.

◆ TIMER_A_PERIOD

#define TIMER_A_PERIOD   524

Timer_A3, PWM TA1.2, Up Mode, DCO SMCLK

Description: This program generates PWM outputs on P2.2 using Timer1_A configured for up mode. The value , TIMER_PERIOD, defines the PWM period and the value DUTY_CYCLE the PWM duty cycle. Using ~1.048MHz SMCLK as TACLK, the timer period is ~480us with a 75% duty cycle on P4.0 ACLK = n/a, SMCLK = MCLK = TACLK = default DCO ~1.048MHz.

Tested On: MSP430FR4133

/ |
RST

| | | P4.0/TA1.1|--> CCR1 - 75% PWM | |

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • Timer peripheral
  • GPIO peripheral

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • NONE

Definition at line 62 of file timer_a_ex1_pwmSingle.c.

Function Documentation

◆ main()

void main ( void  )

Definition at line 66 of file timer_a_ex1_pwmSingle.c.

References __no_operation(), DUTY_CYCLE, param, and TIMER_A_PERIOD.